<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%ad_network}}".
 *
 * @property integer $id
 * @property string $name
 * @property integer $account_id
 * @property string $account_name
 * @property string $account_password
 * @property integer $ad_network_type
 * @property integer $status
 * @property string $last_update
 */
class AdNetwork extends \app\models\BaseAR
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%ad_network}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name', 'account_id'], 'required'],
            [['account_id', 'ad_network_type', 'status'], 'integer'],
            [['last_update'], 'safe'],
            [['name'], 'string', 'max' => 64],
            [['account_name'], 'string', 'max' => 100],
            [['account_password'], 'string', 'max' => 60]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => 'Name',
            'account_id' => 'Account ID',
            'account_name' => 'Account Name',
            'account_password' => 'Account Password',
            'ad_network_type' => 'Ad Network Type',
            'status' => 'Status',
            'last_update' => 'Last Update',
        ];
    }
}
